//
//  SystemNotiModel.m
//  coba-iOS
//
//  Created by 郭四虎 on 15/12/7.
//  Copyright © 2015年 YouKu. All rights reserved.
//

#import "SystemNotiModel.h"

@implementation SystemNotiModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.notiid = value;
    }
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super init]) {
        
        self.obj_id = [aDecoder decodeObjectForKey:@"obj_id"];
        self.type = [aDecoder decodeObjectForKey:@"type"];
        self.notiid = [aDecoder decodeObjectForKey:@"notiid"];
        self.user_id = [aDecoder decodeObjectForKey:@"user_id"];
        self.user_name = [aDecoder decodeObjectForKey:@"user_name"];
        self.parent_ids = [aDecoder decodeObjectForKey:@"parent_ids"];
        self.photo = [aDecoder decodeObjectForKey:@"photo"];
        self.content = [aDecoder decodeObjectForKey:@"content"];
        self.reply_date = [aDecoder decodeObjectForKey:@"reply_date"];
        
        self.from_id = [aDecoder decodeObjectForKey:@"from_id"];
        self.from_user_id = [aDecoder decodeObjectForKey:@"from_user_id"];
        self.from_user_name = [aDecoder decodeObjectForKey:@"from_user_name"];
        self.from_photo = [aDecoder decodeObjectForKey:@"from_photo"];
        self.from_content = [aDecoder decodeObjectForKey:@"from_content"];
        self.from_parent_id = [aDecoder decodeObjectForKey:@"from_parent_id"];
        self.from_parent_ids = [aDecoder decodeObjectForKey:@"from_parent_ids"];
        self.from_reply_date = [aDecoder decodeObjectForKey:@"from_reply_date"];
        self.from_is_up = [aDecoder decodeObjectForKey:@"from_is_up"];
        self.from_up_num = [aDecoder decodeObjectForKey:@"from_up_num"];
        
        self.isViewed = [aDecoder decodeBoolForKey:@"isViewed"];
    }
    
    return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.obj_id forKey:@"obj_id"];
    [aCoder encodeObject:self.type forKey:@"type"];
    [aCoder encodeObject:self.notiid forKey:@"notiid"];
    [aCoder encodeObject:self.user_id forKey:@"user_id"];
    [aCoder encodeObject:self.user_name forKey:@"user_name"];
    [aCoder encodeObject:self.parent_ids forKey:@"parent_ids"];
    [aCoder encodeObject:self.photo forKey:@"photo"];
    [aCoder encodeObject:self.content forKey:@"content"];
    [aCoder encodeObject:self.reply_date forKey:@"reply_date"];
    
    [aCoder encodeObject:self.from_id forKey:@"from_id"];
    [aCoder encodeObject:self.from_user_id forKey:@"from_user_id"];
    [aCoder encodeObject:self.from_user_name forKey:@"from_user_name"];
    [aCoder encodeObject:self.from_photo forKey:@"from_photo"];
    [aCoder encodeObject:self.from_content forKey:@"from_content"];
    [aCoder encodeObject:self.from_parent_id forKey:@"from_parent_id"];
    [aCoder encodeObject:self.from_parent_ids forKey:@"from_parent_ids"];
    [aCoder encodeObject:self.from_reply_date forKey:@"from_reply_date"];
    [aCoder encodeObject:self.from_is_up forKey:@"from_is_up"];
    [aCoder encodeObject:self.from_up_num forKey:@"from_up_num"];
    
    [aCoder encodeBool:self.isViewed forKey:@"isViewed"];
}

@end
